package com.TeamJigsaw.DanteTrail.Models;

import java.awt.Image;

public class Sprite {
	private Image picture;
	
	private int x;
	
	private int y;
	
	private int ySpeed;
	
	private int xSpeed;
	
	/**
	 * Creates and initializes a sprite object
	 * @param picture The image of the sprite
	 * @param x The x part of the top-left coordinate of the sprite
	 * @param y The y part of the top-left coordinate of the sprite
	 */
	public Sprite(Image picture, int x, int y) {
		this.picture = picture;
		this.x = x;
		this.y = y;
		ySpeed = 0;
		xSpeed =  0;
	}
	
	/**
	 * Moves the sprite by the ySpeed and xSpeed
	 */
	public void move() {
		x += xSpeed;
		y += ySpeed;
	}
	
	public Image getImage() {
		return picture;
	}

	public void setImage(Image picture) {
		this.picture = picture;
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public int getYSpeed() {
		return ySpeed;
	}

	public void setYSpeed(int ySpeed) {
		this.ySpeed = ySpeed;
	}

	public int getXSpeed() {
		return xSpeed;
	}

	public void setXSpeed(int xSpeed) {
		this.xSpeed = xSpeed;
	}
	
	public int getWidth() {
		return picture.getWidth(null);
	}
	
	public int getHeight() {
		return picture.getHeight(null);
	}
	
	@Override
	public String toString() {
		return ("This is a sprite");
	}
}
